package demo3;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Demo1 {
    public static void main1(String[] args) {
        int[] nums = {1,0,2,9,3,8,4,7,5,6};
        System.out.println(Arrays.toString(nums));
        for(int i = 0; i < nums.length - 1; i++) {
            for(int j = 0;  j < nums.length - 1 - i; j++){
                if(nums[j] < nums[j+1] ) {
                    int temp = nums[j];
                    nums[j] = nums[j+1];
                    nums[j+1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(nums));
    }

    public static <List> void main(String[] args) {
        String tmp = new String("cba");
        String substring1 = tmp.substring(0, 2);
        System.out.println(substring1);

        char[] chars = tmp.toCharArray();
        Arrays.sort(chars);
        System.out.println(Arrays.toString(chars));
        System.out.println("abc".equals(chars.toString()));
        System.out.println(tmp);
        boolean abc = tmp.startsWith("abc");
        System.out.println(abc);
        String substring = tmp.substring(0, tmp.length());
        tmp.replace(',','a');
        System.out.println(tmp);
        System.out.println(substring);
        String[] strs = {"123","asf"};
        strs.toString().replace("[]","");
        boolean an1 = tmp.startsWith("an");
        boolean tp = tmp.contains("ae");
        System.out.println(tp);
        System.out.println(an1);
        java.util.List<Integer> list = new ArrayList<>();
    }
}
